<?php
	$lang = $this->lang->lang();
	$curl = ($lang == 'vi') ? 1 : $this->utility->currency('USD','VND','1');
	
?>  
    <div class="right">
        
		<div class="product">
        	<div class="hiar">
            	Trang chủ > Giỏ hàng
            </div><!-- END HIAR -->
            
        	<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
					<input type="hidden" name="cmd" value="_cart">
					<input type="hidden" name="upload" value="1">
					<input type="hidden" name="business" value="seller_1328165621_biz@gmail.com">
			
			<div class="register cart">
            	<h1 class="sample"><a href="#" class="white" title="#"><?php echo lang('cart.info')?></a></h1>
                <ul class="carted">
                	<li class="cell first">
                    	<ul class="list">
                        	<li class="no"><?php echo lang('cart.order')?></li>
                        	<li class="pro"><?php echo lang('cart.product')?></li>
                        	<li class="manu"><?php echo lang('cart.manufacturer')?></li>
                        	<li class="price"><?php echo lang('cart.price')?></li>
                        	<li class="count"><?php echo lang('cart.quantity')?></li>
                        	<li class="total"><?php echo lang('cart.subtotal')?></li>
                        	<li class="act">Action</li>
                            <div class="clear"></div>
                        </ul><!-- END LIST -->
                    </li><!-- END CELL-->
                    
                    
                    
                    <?php
                    	$i = 1;
                    	foreach ($this->cart->contents() as $item):
                    ?>
                    <input type="hidden" name="item_name_<?php echo $i; ?>" value="<?php echo $item['name']; ?>">
					<input type="hidden" name="item_number_<?php echo $i; ?>" value="<?php echo $item['id']; ?>">
					<input type="hidden" name="amount_<?php echo $i; ?>" value="<?php echo $this->cart->format_number($item['price'] / $curl);
                    																	//echo $item['price'] ?>">
					<input type="hidden" name="quantity_<?php echo $i; ?>" value="<?php echo $item['qty']; ?>">
                    
                    <li class="cell child">
                    	<ul class="list">
                        	<li class="no"><?php echo $i?></li>
                        	<li class="pro">
                            <img src="<?php echo base_url('assets/images/'.$item['options']['image']) ?>" width="135" />
                            	<p>White dress</p>
                            </li>
                        	<li class="manu"><?php echo $item['options']['manufacturer_name']?></li>
                        	<li class="price" id="product-price"><?php echo $this->cart->format_number($item['price'] / $curl); ?> <?php if($lang == 'vi')echo 'VNĐ';else echo 'USD'?></li>
                        	<li class="count"><input type="text" value="<?php echo $item['qty']?>" id="qty<?php echo $item['id']?>"/></li>
                        	<li class="total" id="product-subtotal"><?php echo $this->cart->format_number(round( $item['subtotal'] / $curl, 4)); ?> <?php if($lang == 'vi')echo 'VNĐ';else echo 'USD'?></li>
                        	<li class="act">
                        		<a href="#" onclick="update_to_cart('<?php echo $item['rowid']?>','<?php echo base_url($this->lang->lang())?>','qty<?php echo $item['id']?>','<?php echo $item['price']?>'); return false;">
                        			<?php echo lang('cart.update')?>
                        		</a>
                        		| 
                        		<a href="#" onclick="remove_to_cart('<?php echo $item['rowid']?>','<?php echo base_url($this->lang->lang())?>'); return false;">
                        			<?php echo lang('cart.remove')?>
                        		</a>
							</li>
                            <div class="clear"></div>
                        </ul><!-- END LIST -->
                    </li><!-- END CELL-->
                    <?php $i++; endforeach;?>
                    <input type="hidden" name="currency_code" value="USD">
					<input type="hidden" name="lc" value="US">
					<input type="hidden" name="rm" value="2">
					<input type="hidden" name="shipping_1" value="10">
					<input type="hidden" name="return" value="<?php echo base_url()?>">
					<input type="hidden" name="cancel_return" value="http://www.phpvideotutorials.com/gamelist/">
					<input type="hidden" name="notify_url" value="http://www.phpvideotutorials.com/gamelist/paypal.php">
					<?php if($this->cart->total_items()):?>
                    <li class="check-out">
<!--                    <a href="#" onclick="checkSignedIn()"><img src="<?php echo base_url() ?>assets/images/checkout.jpg" width="118" height="40" alt="Check out" /></a>-->
                    	<input type="image" src="<?php echo base_url() ?>assets/images/checkout.jpg" onclick="checkSignedIn();return false;"/>
					</li>
                    <li class="check-out" id="cart-total"><?php echo lang('cart.total')?>: <?php echo $this->cart->format_number(round($this->cart->total() / $curl , 4)); ?> <?php if($lang == 'vi')echo 'VNĐ';else echo 'USD'?></li>
                    <?php endif;?>
					<div class="clear"></div>
                   
                </ul><!-- END CARTED -->
            </div><!-- END CART -->
            </form> 
    </div><!-- END PRODUCT-->
    </div><!-- END RIGHT-->
	<div class="clear"></div>
